package AOP;

public class Calc1ImplStaticProxy implements Calc1{
    private CaLcImpl target;


    public Calc1ImplStaticProxy(CaLcImpl target) {
        this.target = target;
    }
    @Override
    public int add(int i, int j) {
        MyLogging.methodBefore("add()",i,j);

         int res= target.add(i, j);
         MyLogging.methodAfter("add()",res);

        return res;
    }

    @Override
    public int sub(int i, int j) {

        return  target.sub(i, j);
    }

    @Override
    public int mul(int i, int j) {
        return target.mul(i, j);
    }

    @Override
    public int div(int i, int j) {
        return target.div(i, j);
    }
}
